// import {configureStore, createSlice} from "@reduxjs/toolkit";
//
// const store = configureStore({
//     reducer: {
//         // student: stuReducer,
//         // school:schoolReducer
//         [studentApi.reducerPath]:studentApi.reducer
//     },
//     middleware:getDefaultMiddleware=>
//          getDefaultMiddleware().concat(studentApi.middleware),
// })
// export default store
import React from 'react'
import {ListStore} from "@/store/list.Store";
import {CounterStore} from "@/store/counter.Store";
import {TaskStore} from "@/store/task.Store";
import {LoginStore} from "@/store/login.store";
import {UserStore} from "@/store/user.Store";
import {ChannelStore} from "@/store/channel.Store";
class RootStore{
    constructor() {
        this.listStore=new ListStore();
        this.countStore=new CounterStore();
        this.taskStore=new TaskStore()
        this.loginStore=new LoginStore()
        this.userStore=new UserStore()
        this.channelStore = new ChannelStore();
    }
}

const rootStore = new RootStore();
const context = React.createContext(rootStore);
// console.log(context,'context')
const useStore=()=>React.useContext(context);
export {useStore,rootStore,context}

